let d;
while(d = readline()){
    let n = Number(d);
    let r = 0;
    for (let i = 0; i < n; i++) {
        let a= Number(readline());
        r += a;
    }
    console.log(r);
}